import request from '@/utils/request'
//获取sku列表数据的接口函数
export function reqgetBaseSku(page,limit) {
 
  return request({
    url: `/admin/product/list/${page}/${limit}`,
    method: 'get',
  })
}


//去上架
export function reqTosale(skuId){
    return request({
        url:`/admin/product/onSale/${skuId}`
    })
}

//去下架
export function reqCancelsale(skuId){
    return request({
        url:`/admin/product/cancelSale/${skuId}`
    })
}

//获取一条spu数据

export function reqGetonespu(skuId){
    return request({
        url:`/admin/product/getSkuById/${skuId}`
    })
}

//删除一条sku数据
export function reqDelonesku(skuId){
    return request({
        url:`/admin/product/deleteSku/${skuId}`,
        method:'delete'
    })
}